package cn.hello1023.springbootlabs.mq;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Producer {
    @Autowired
    private AmqpTemplate rabbitAmqpTemplate;
    public void send(String msg){
        rabbitAmqpTemplate.convertAndSend("queue-name",msg);
    }
}
